﻿using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "PostsAttach")]
    public class PostsAttachInfo : IDetach
    {
        public PostsAttachInfo()
        {
            Detach();
        }
        #region Model
        private int _id;
        private int _postid = 0;
        private DateTime _attachDate = DateTime.Now;
        private string _filename = "";
        private string _filetype = "";
        private string _ransign = "";
        /// <summary>
        /// 
        /// </summary>
        [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int PostId
        {
            set { _postid = value; }
            get { return _postid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public DateTime AttachDate
        {
            set { _attachDate = value; }
            get { return _attachDate; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string FileName
        {
            set { _filename = value; }
            get { return _filename; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string FileType
        {
            set { _filetype = value; }
            get { return _filetype; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string RanSign
        {
            set { _ransign = value; }
            get { return _ransign; }
        }
        #endregion Model

        public void Detach()
        {

        }
    }
}
